-kinds = Program::KINDS

-content_for :modal_title do
  -if f.object.new_record?
    Create a new program
  -else
    Edit program

-if !f.object.new_record?
  -content_for :modal_delete_path, method("delete_flow_program_path").call(f.object)

.row-fluid
  =wrapped_text_field f, :span6, :title, :placeholder => 'Enter title', :label_name => 'Title <span class="required">*</span>'.html_safe
  .span6
    .row-fluid
      =wrapped_text_field f, :span6, :slug, :label_name => 'Code (autofill)', :placeholder => "#{f.object.default_slug_prefix.upcase}-XXXX"
      -#=wrapped_text_field f, :span6, :version, :placeholder => '1.1.1'
      -if f.object.new_record?
        =wrapped_select f, :span6, :kind, kinds, :selected => f.object.kind

.row-fluid
  =wrapped_text_area f, :span6, :description, :class => 'double wysihtml5', :wrapper_div_class => 'wysiwyg-area', :placeholder => 'Enter description here'
  .span6
    .row-fluid
      =wrapped_date_field f, :span6, :start_date, :class => 'date', :label_name => 'Effective Date', :placeholder => 'MM/DD/YYYY'
      =wrapped_date_field f, :span6, :stop_date, :class => 'date', :label_name => 'Stop Date', :placeholder => 'MM/DD/YYYY'

.row-fluid
  =wrapped_text_field f, :span6, :url, :label_name => 'Direct URL (optional)', :placeholder => 'http://www.example.com/'

  .span6

%br

=render :partial => "shared/wysihtml5"

